package com.mall.seckill.model;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 秒杀订单表
 * </p>
 *
 * @author Darren
 * @since 2022-09-28
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("seckill_order")
@ApiModel(value="SeckillOrder对象", description="秒杀订单表")
public class SeckillOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 秒杀商品ID
     */
    @ApiModelProperty(value = "秒杀商品ID")
    @TableField("seckill_goods_id")
    private String seckillGoodsId;

    /**
     * 支付金额
     */
    @ApiModelProperty(value = "支付金额")
    @TableField("money")
    private Integer money;

    /**
     * 用户
     */
    @ApiModelProperty(value = "用户")
    @TableField("username")
    private String username;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 支付时间
     */
    @ApiModelProperty(value = "支付时间")
    @TableField("pay_time")
    private Date payTime;

    /**
     * 状态，0未支付，1已支付
     */
    @ApiModelProperty(value = "状态，0未支付，1已支付")
    @TableField("status")
    private Integer status;

    /**
     * 交易流水
     */
    @ApiModelProperty(value = "交易流水")
    @TableField("weixin_transaction_id")
    private String weixinTransactionId;


}
